package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 系统日志表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_system_logs")
public class SystemLogs extends Model<SystemLogs> {

    private static final long serialVersionUID = 1L;

    /**
     * 日志唯一标识
     */
    @TableId("log_id")
    private Long logId;
    /**
     * 日志级别（如INFO、WARNING、ERROR）
     */
    @TableField("log_level")
    private String logLevel;
    /**
     * 日志内容
     */
    @TableField("log_message")
    private String logMessage;
    /**
     * 日志来源（如模块名称、文件名）
     */
    @TableField("log_source")
    private String logSource;
    /**
     * 操作用户ID（关联用户表，如果是用户操作）
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 操作IP地址
     */
    @TableField("ip_address")
    private String ipAddress;
    /**
     * 日志生成时间
     */
    @TableField("create_date")
    private Date createDate;


    public Long getLogId() {
        return logId;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public String getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(String logLevel) {
        this.logLevel = logLevel;
    }

    public String getLogMessage() {
        return logMessage;
    }

    public void setLogMessage(String logMessage) {
        this.logMessage = logMessage;
    }

    public String getLogSource() {
        return logSource;
    }

    public void setLogSource(String logSource) {
        this.logSource = logSource;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public String toString() {
        return "SystemLogs{" +
        ", logId=" + logId +
        ", logLevel=" + logLevel +
        ", logMessage=" + logMessage +
        ", logSource=" + logSource +
        ", userId=" + userId +
        ", ipAddress=" + ipAddress +
        ", createDate=" + createDate +
        "}";
    }
}
